package cn.wolfcode.car.business.service;

import cn.wolfcode.car.business.domain.Appointment;
import cn.wolfcode.car.business.domain.BusinessStatement;
import cn.wolfcode.car.business.query.AppointmentQuery;
import cn.wolfcode.car.common.base.page.TablePageInfo;
import cn.wolfcode.car.common.base.query.QueryObject;

import java.util.List;

/**
 * 预约服务接口
 */
public interface IAppointmentService {

    /**
     * 分页+过滤查询
     */
    TablePageInfo<Appointment> query(AppointmentQuery qo);


    /**
     * 查单个
     * @param id
     * @return
     */
    Appointment get(Long id);


    /**
     * 保存
     * @param appointment
     */
    void save(Appointment appointment);

  
    /**
     * 更新
     * @param appointment
     */
    void update(Appointment appointment);

    /**
     *  批量删除
     * @param ids
     */
    void deleteBatch(String ids);

    /**
     * 查询全部
     * @return
     */
    List<Appointment> list();

    /**
     * 消费者到店
     * @param id
     */
    void arrivaled(Long id);

    /**
     * 取消
     * @param id
     */
    void cancel(Long id);

    /**
     * 软删除
     * @param id
     */
    void updateIsDel(Long id);

    /**
     * 根据预约单生成结算单
     * @param appointmentId
     * @return
     */
    BusinessStatement generaterStatement(Long appointmentId);

    /**
     * 修改结算单的状态
     * @param id
     * @param statusSettle
     */
    void updateAppointStatus(Long id, Integer statusSettle);
}
